package com.mujin.keji.collectionsystem.module.mypager.views;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.mujin.keji.collectionsystem.CcsApplication;
import com.mujin.keji.collectionsystem.R;
import com.mujin.keji.collectionsystem.base.BaseActivity;

/**
 * 关于界面
 *
 * @author weishixiong
 * @Time 2018-05-2
 */

public class AboutActivity extends BaseActivity {
    private TextView tvVersion;
    private RelativeLayout rlHistoryVersion;


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        CcsApplication.addActivity(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        CcsApplication.removeActivity(this);
    }

    @Override
    protected void createViewModel() {

    }

    @Override
    public int intiLayout() {
        return R.layout.activity_abaout;
    }

    @Override
    public void initView() {
        setCenterTitle("关于完美外访", "#FFFFFF");
        setleftImage(R.drawable.image_arrow_left_white, true, null);
        tvVersion = (TextView) findViewById(R.id.tv_version);
        rlHistoryVersion = (RelativeLayout) findViewById(R.id.rl_history_version);
        tvVersion.setText(CcsApplication.getInstance().getAppVersion());
    }

    @Override
    public void initData() {

    }

    @Override
    public void initListener() {
        rlHistoryVersion.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(AboutActivity.this, HistoryVersionListActivity.class));
            }
        });
    }
}
